# Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Geoffroy Carrier <geoffroy@archlinux.org>
# Contributor: Roman Kyrylych <Roman.Kyrylych@gmail.com>

pkgname=xerces-c
pkgver=3.2.4
pkgrel=2
pkgdesc="A validating XML parser written in a portable subset of C++"
arch=('x86_64')
url="https://xerces.apache.org/xerces-c/"
license=('APACHE')
depends=('gcc-libs' 'curl' 'libnsl' 'icu')
source=("https://archive.apache.org/dist/xerces/c/3/sources/${pkgname}-${pkgver}.tar.gz")
sha256sums=('3d8ec1c7f94e38fee0e4ca5ad1e1d9db23cbf3a10bba626f6b4afa2dedafe5ab')

build() {
  cd "${pkgname}-${pkgver}"

  [[ "${CARCH}" = "i686" ]] && SSE2="--disable-sse2"
  ./configure --prefix=/usr --sysconfdir=/etc ${SSE2}
  make
}

package() {
  cd "${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}/" install
}
